package com.atguigu.gmall.cart.service;

import com.atguigu.gmall.model.cart.CartItem;
import com.atguigu.gmall.model.to.UserAuthTo;

import java.math.BigDecimal;
import java.util.List;

public interface CartService {
    CartItem addSkuToCart(Long skuId, Integer skuNum);

    //判断用哪个key
    String getCartKey();

    CartItem saveSkuToRedis(Long skuId, Integer skuNum,String cartKey);

    List<CartItem> cartList();

    void updateSkuItemPrice(String cartKey, Long skuId, BigDecimal price);

    void updateNumToCart(Long skuId, Integer num);

    void updateCheckToCart(Long skuId, Integer checked);

    void deleteCartItem(Long skuId);

    void deleteChecked();

    List<CartItem> getCartItemForOrderVo();
}
